package org.zdd.bookstore.config;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;

import java.io.IOException;
import java.net.URL;

public class test {


    public static void main(String[] args) {
        //爬取京东图书
        String url = "https://www.runoob.com/xml/xml-cdata.html";

        Document document = null;
        try {
            document = Jsoup.parse(new URL(url), 30000);
        } catch (IOException e) {
            e.printStackTrace();
            System.out.println("爬取失败");
        }

        Elements elements = document.getElementsByClass("design");

        System.out.println(elements.html());
    }
}